<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
	<title>综合演示用例</title>
	
	<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">

<!-- 可选的Bootstrap主题文件（一般不用引入） -->
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">

<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

	<script>
		$(document).ready(function() {
			$("#account-tab").addClass("active");
		});
	</script>
</head>

<body>
<div class="container" style="width: 99%">
<h2>城市代言家后台统计</h2>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
		<tr>
			<th>参与总人次：（就是点击进去的次数）</th>
			<th>参与总人数：（报名+投票总人数）</th>
			<th>领奖人数：（填写领奖信息的用户）</th>
		</tr>
		</thead>
		<tbody>
			<tr>
				<td>${totalCount}&nbsp;</td>
				<td>${totalForCanyu}&nbsp;</td>
				<td>${totalForReceivePrize}&nbsp;</td>
			</tr>
		</tbody>		
	</table>
	
	<ul class="nav nav-tabs">
	   <li role="presentation"><a href="${ctx}/admin/search_1">报名列表</a></li>
	  <li role="presentation" class="active"><a href="${ctx}/admin/search_2">投票列表</a></li>
	</ul>
        <h3>投票列表（只投票的） 投票人数：${voteCount}</h3>
        <table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
		<tr>
			<th>序号</th>
			<th>姓名</th>
			<th>电话</th>
			<th>奖品</th>
			<th>是否想买房</th>
			<th>第一次投票日期</th>
		</tr>
		</thead>
		<tbody>
		<c:forEach items="${list}" var="user" varStatus="indexStatus">
			<tr>
				<td>${user.id}&nbsp;</td>
				<td>${user.name}&nbsp;</td>
				<td>${user.mobile}&nbsp;</td>
				<td>${user.prize}&nbsp;</td>
				<td>${user.purchaseIntention}&nbsp;</td>
				<td><fmt:formatDate value="${user.winningDate}" pattern="yyyy-MM-dd HH:mm:ss" />&nbsp;</td>
			</tr>
		</c:forEach>
		</tbody>		
	</table>
      </div>
	
	
</body>
</html>
